﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGePointOnSurface : OdGePointEnt3d
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGePointOnSurface(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGePointOnSurface_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGePointOnSurface obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGePointOnSurface()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGePointOnSurface(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public OdGePointOnSurface() : this(GlobalsPINVOKE.new_OdGePointOnSurface__SWIG_0(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGePointOnSurface(OdGePointOnSurface source) : this(GlobalsPINVOKE.new_OdGePointOnSurface__SWIG_1(OdGePointOnSurface.getCPtr(source)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGePointOnSurface(OdGeSurface surface) : this(GlobalsPINVOKE.new_OdGePointOnSurface__SWIG_2(OdGeSurface.getCPtr(surface)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGePointOnSurface(OdGeSurface surface, OdGePoint2d param) : this(GlobalsPINVOKE.new_OdGePointOnSurface__SWIG_3(OdGeSurface.getCPtr(surface), OdGePoint2d.getCPtr(param)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGePointOnSurface Assign(OdGePointOnSurface pntOnSurface)
		{
			OdGePointOnSurface result = new OdGePointOnSurface(GlobalsPINVOKE.OdGePointOnSurface_Assign(this.swigCPtr, OdGePointOnSurface.getCPtr(pntOnSurface)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeSurface surface()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGePointOnSurface_surface(this.swigCPtr);
			OdGeSurface result = (intPtr == IntPtr.Zero) ? null : new OdGeSurface(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint2d parameter()
		{
			OdGePoint2d result = new OdGePoint2d(GlobalsPINVOKE.OdGePointOnSurface_parameter(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint3d point()
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGePointOnSurface_point__SWIG_0(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint3d point(OdGePoint2d param)
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGePointOnSurface_point__SWIG_1(this.swigCPtr, OdGePoint2d.getCPtr(param)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint3d point(OdGeSurface surface, OdGePoint2d param)
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGePointOnSurface_point__SWIG_2(this.swigCPtr, OdGeSurface.getCPtr(surface), OdGePoint2d.getCPtr(param)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d normal()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnSurface_normal__SWIG_0(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d normal(OdGePoint2d param)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnSurface_normal__SWIG_1(this.swigCPtr, OdGePoint2d.getCPtr(param)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d normal(OdGeSurface surface, OdGePoint2d param)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnSurface_normal__SWIG_2(this.swigCPtr, OdGeSurface.getCPtr(surface), OdGePoint2d.getCPtr(param)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d uDeriv(int order)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnSurface_uDeriv__SWIG_0(this.swigCPtr, order), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d uDeriv(int order, OdGePoint2d param)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnSurface_uDeriv__SWIG_1(this.swigCPtr, order, OdGePoint2d.getCPtr(param)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d uDeriv(int order, OdGeSurface surface, OdGePoint2d param)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnSurface_uDeriv__SWIG_2(this.swigCPtr, order, OdGeSurface.getCPtr(surface), OdGePoint2d.getCPtr(param)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d vDeriv(int order)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnSurface_vDeriv__SWIG_0(this.swigCPtr, order), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d vDeriv(int order, OdGePoint2d param)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnSurface_vDeriv__SWIG_1(this.swigCPtr, order, OdGePoint2d.getCPtr(param)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d vDeriv(int order, OdGeSurface surface, OdGePoint2d param)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnSurface_vDeriv__SWIG_2(this.swigCPtr, order, OdGeSurface.getCPtr(surface), OdGePoint2d.getCPtr(param)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d mixedPartial()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnSurface_mixedPartial__SWIG_0(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d mixedPartial(OdGePoint2d param)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnSurface_mixedPartial__SWIG_1(this.swigCPtr, OdGePoint2d.getCPtr(param)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d mixedPartial(OdGeSurface surface, OdGePoint2d param)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnSurface_mixedPartial__SWIG_2(this.swigCPtr, OdGeSurface.getCPtr(surface), OdGePoint2d.getCPtr(param)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d tangentVector(OdGeVector2d vect)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnSurface_tangentVector__SWIG_0(this.swigCPtr, OdGeVector2d.getCPtr(vect).Handle), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d tangentVector(OdGeVector2d vect, OdGePoint2d param)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnSurface_tangentVector__SWIG_1(this.swigCPtr, OdGeVector2d.getCPtr(vect).Handle, OdGePoint2d.getCPtr(param)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d tangentVector(OdGeVector2d vect, OdGeSurface surface, OdGePoint2d param)
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGePointOnSurface_tangentVector__SWIG_2(this.swigCPtr, OdGeVector2d.getCPtr(vect).Handle, OdGeSurface.getCPtr(surface), OdGePoint2d.getCPtr(param)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector2d inverseTangentVector(OdGeVector3d vect)
		{
			OdGeVector2d result = new OdGeVector2d(GlobalsPINVOKE.OdGePointOnSurface_inverseTangentVector__SWIG_0(this.swigCPtr, OdGeVector3d.getCPtr(vect)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector2d inverseTangentVector(OdGeVector3d vect, OdGePoint2d param)
		{
			OdGeVector2d result = new OdGeVector2d(GlobalsPINVOKE.OdGePointOnSurface_inverseTangentVector__SWIG_1(this.swigCPtr, OdGeVector3d.getCPtr(vect), OdGePoint2d.getCPtr(param)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector2d inverseTangentVector(OdGeVector3d vect, OdGeSurface surface, OdGePoint2d param)
		{
			OdGeVector2d result = new OdGeVector2d(GlobalsPINVOKE.OdGePointOnSurface_inverseTangentVector__SWIG_2(this.swigCPtr, OdGeVector3d.getCPtr(vect), OdGeSurface.getCPtr(surface), OdGePoint2d.getCPtr(param)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePointOnSurface setSurface(OdGeSurface surface)
		{
			OdGePointOnSurface result = new OdGePointOnSurface(GlobalsPINVOKE.OdGePointOnSurface_setSurface(this.swigCPtr, OdGeSurface.getCPtr(surface)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePointOnSurface setParameter(OdGePoint2d param)
		{
			OdGePointOnSurface result = new OdGePointOnSurface(GlobalsPINVOKE.OdGePointOnSurface_setParameter(this.swigCPtr, OdGePoint2d.getCPtr(param)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
